<?php use application\Comm\Func;
$pager = new \application\Comm\Pager($page);
?>
<link rel="stylesheet" href="<?php echo Func::staticUrl('css/consulting_list.css?v=20170608') ?>">

<!--头部-->

<div class="consulting wrap">
    <div class="nav_link">
        <a href="<?= Func::createUrl('site/index')?>">首页</a>
        >
        <a href="javascript:;">家居小知识</a>
    </div>
    <div class="poster">
        <img src="<?=Func::staticUrl('images/consulting/ban.jpg') ?>">
    </div>
    <div class="box">
        <div class="box_l">
            <h3>家居小知识</h3>
            <ul class="listing">
            <?php foreach ($data as $key => $val){?>
                <li>
                    <img src="<?=$val['thumb'] ?>">
                    <div class="detail">
                        <div class="tit">
                            <p><?= $val['name']?></p>
                            <span><?=$val['create_time'] ?></span>
                        </div>
                        <p class="describe"><?=$val['description'] ?><a href="<?=Func::createUrl('decorate/view',['id'=>$val['id']]) ?>">[详情]</a></p>
                        <div class="keyword">
                            <span>关键词：</span>
                            <?php foreach ($val['tag_name'] as $k => $v){?>
                            <a><?=$v['name'] ?></a>
                            <?php }?>
                        </div>
                    </div>
                </li>
                <?php }?>
            </ul>
        </div>
        <div class="box_r">
            <div class="one">
                <?php  include_once dirname(__FILE__).'/../common/apply.php'; ?>
            </div>
            <div class="two">
                <div class="tit">
                    <i></i>
                    <span>热门文章</span>
                    <a href="javascript:;">更多》</a>
                </div>
                <div class="article">
                    <ul>
                    	<?php $i = 1; foreach ($hot_list as $hkey => $hval){?>
	                        <li <?php if ($i < 4) echo 'class="act"'?>>
	                            <span><?=$i?></span>
	                            <a href="<?=Func::createUrl('decorate/view',['id'=>$hval['id']]) ?>"><?=$hval['name'] ?></a>
	                        </li>
                        <?php $i++;}?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="paging_list">
		<?=$pager->show(2)?>
    </div>
</div>
<!--尾部-->